package com.dingxin.ship_together_api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
* Author: ctj
* Date: 2022-09-24
* Time: 16:13
*/

/**
    * 订单快照表
    */
@ApiModel(value="订单快照表")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "ship_together.order_snapshot")
public class OrderSnapshot implements Serializable {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value="")
    private Long id;

    /**
     * 订单id
     */
    @TableField(value = "order_id")
    @ApiModelProperty(value="订单id")
    private Long orderId;

    /**
     * 船只id
     */
    @TableField(value = "ship_id")
    @ApiModelProperty(value="船只id")
    private Long shipId;

    /**
     * 目的地/A-B
     */
    @TableField(value = "destination")
    @ApiModelProperty(value="目的地/A-B")
    private String destination;

    /**
     * 航线类型 0-拼船  1-包船
     */
    @TableField(value = "route_type")
    @ApiModelProperty(value="航线类型 0-拼船  1-包船")
    private Integer routeType;

    /**
     * 总座位数
     */
    @TableField(value = "seats")
    @ApiModelProperty(value="总座位数")
    private Integer seats;

    /**
     * 订单人数
     */
    @TableField(value = "people_count")
    @ApiModelProperty(value="订单人数")
    private Integer peopleCount;

    /**
     * 出发时间
     */
    @TableField(value = "start_time")
    @ApiModelProperty(value="出发时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    /**
     * 返回时间
     */
    @TableField(value = "end_time")
    @ApiModelProperty(value="返回时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    /**
     * 订单金额
     */
    @TableField(value = "total_price")
    @ApiModelProperty(value="订单金额")
    private Long totalPrice;

    /**
     * 订单最终状态
     */
    @TableField(value = "final_status")
    @ApiModelProperty(value="订单最终状态")
    private Integer finalStatus;

    /**
     * 创建人
     */
    @TableField(value = "create_by" ,fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value="创建时间")
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "update_by",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "deleted")
    @ApiModelProperty(value="是否删除")
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_ORDER_ID = "order_id";

    public static final String COL_SHIP_ID = "ship_id";

    public static final String COL_DESTINATION = "destination";

    public static final String COL_ROUTE_TYPE = "route_type";

    public static final String COL_SEATS = "seats";

    public static final String COL_PEOPLE_COUNT = "people_count";

    public static final String COL_START_TIME = "start_time";

    public static final String COL_END_TIME = "end_time";

    public static final String COL_TOTAL_PRICE = "total_price";

    public static final String COL_FINAL_STATUS = "final_status";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_DELETED = "deleted";
}